<!DOCTYPE html>

<html xmlns:th="http://www.thymeleaf.org">
<head th:replace="layouts::header"></head>

<body>
<nav th:replace="layouts::navbar"></nav>
<div class="container">
    <h3>宿舍目录</h3>
    <br>
    <a th:href="@{/rooms/new}" class="btn btn-primary btn-sm mb-3">新增宿舍</a>
    <br/>
    <table class="table table-bordered table-striped">
        <thead class="thead-dark">
        <th>宿舍编号</th>
        <th>宿舍状态</th>
        </thead>
        <tbody>
        <tr th:each="aRoom : ${rooms}">
            <td th:text="${aRoom.buildingId}+${aRoom.floorId}+${aRoom.roomId}"></td>
            <td th:text="${aRoom.floorId}"></td>
        </tr>
        </tbody>
    </table>
</div>
</body>
</html>